package Work3;

public class buzz extends Thread{
	int num;
	public buzz(int num){
		this.num=num;
	}
	@Override
	public void run() {
		if(num%5==0){
			System.out.println(FizzBuzzDemo.weakup);
			if(FizzBuzzDemo.weakup){
				try {
					FizzBuzzDemo.lock.wait();
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
			System.out.print("buzz ");
			FizzBuzzDemo.weakup=true;
		}
	}
}
